/*
 *
 * Created on: 06.10.2012
 *
 * serializable.h
 * This file is part of KOBUS
 * 
 * Copyright (C) 2012 - Ivan Penkin, MIPT
 * grek.penkin@gmail.com
 *
 * KOBUS is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * KOBUS is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with KOBUS; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin St, Fifth Floor, 
 * Boston, MA  02110-1301  USA
 *  
 */

#ifndef QSERIALIZABLE_H_
#define QSERIALIZABLE_H_

#include <KobusCommon_global.h>

#include <qobject.h>
#include <qstring.h>
#include <qdatastream.h>

namespace kobus
{

class KOBUS_COMMON_EXPORT QSerializable: public QObject
{

    Q_OBJECT

  public:
    explicit
    QSerializable (QObject * parent = 0);

    virtual
    ~QSerializable();

    static const QDataStream::Version version = QDataStream::Qt_4_6;

    friend
    QDataStream & operator << (
                      QDataStream & /* stream */,
                      QSerializable & /* data */
                  );

    friend
    QDataStream & operator >> (
                      QDataStream & /* stream */,
                      QSerializable & /* data */
                  );

};

} /* namespace kobus */

Q_DECLARE_TYPEINFO(kobus::QSerializable, Q_COMPLEX_TYPE);

#endif /* QSERIALIZABLE_H_ */
